<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 300px;
            height: 300px;
            background-color: pink;
        }
        
        /* E::after,E::before伪元素选择器,添加一个伪元素,默认display属性为行内 */
        /* 必须有content:'',内容为空则''内为空' */
        div::before {
            content: '老鼠';

            width: 100px;
            height: 100px;
            background-color: brown;
            display: block;
        }

        div::after {
            content: '大米';
            width: 100px;
            height: 100px;
            background-color: yellow;
            display: block;
        }
    </style>
</head>
<body>
    <div>爱</div>
</body>
</html>